package com.maple.logger;

import com.maple.controller.LogController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;

/**
 * @author <a href=mailto:leihuazhe@gmail.com>maple</a>
 * @since 2018-10-21 9:27 PM
 */
public class LogThread implements Runnable {
    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    /**
     * MDC为“Mapped Diagnostic Context”（映射诊断上下文）
     */
    @Override
    public void run() {
        MDC.put("logFileName", "");
        logger.info("start counter {}", "");
        MDC.remove("logFileName");
    }

}
